<template>
    <div class="container">
        <my-button width="150">添加</my-button>
        <div class="title">
            
            <div class="item">文章ID</div>
            <div class="item">文章标题</div>
            <div class="item">文章标签</div>
            <div class="item">作者</div>
            <div class="item">操作</div>
        </div>
        <div class="content" v-for="(obj, index) in articleList" :key="index">
            <div class="item">{{obj.id}}</div>
            <div class="item">{{obj.title}}</div>
            <div class="item">{{obj.label}}</div>
            <div class="item">{{obj.author}}</div>
            <div class="item">
                <my-button>编辑</my-button>
                <my-button type="danger">删除</my-button>
            </div>
        </div>
    </div>
    
</template>

<script>
import myButton from '../3.21/myButton.vue'
export default {
  components: { myButton },
    data() {
        return{
            articleList:[
                {
                    id:"001",
                    title:"习近平谈治国理政",
                    label:"政治",
                    author:"习近平",
                    checked:false,
                },
                {
                    id:"002",
                    title:"明朝那些事",
                    label:"历史",
                    author:"当年明月",
                    checked:false,
                },
                {
                    id:"003",
                    title:"vue3.x",
                    label:"计算机",
                    author:"尤雨溪",
                    checked:false,
                },
            ]
        }
    },
    methods:{

    }
}
</script>
<style scoped>
.title{
    display: flex;
    background: #f2f2f2;
    border-bottom: 1px solid #eee;
    padding: 0 10px;
    text-align: center;
}
.content{
    display: flex;
    background: white;
    border-bottom: 1px solid #eee;
    padding: 0 10px;
    text-align: center;
}
.item{
    flex:1;
    height: 50px;
    line-height: 50px;
}

</style>